package command.main.command;

import command.main.receiver.IReceiver;

public class Post implements IPost {

    private final IReceiver receiver;

    public Post(IReceiver receiver) {
        this.receiver = receiver;
    }

    /**
     * 邮局发送信件
     *
     * @param message 信件
     */
    @Override
    public void sendMail(String message) {
        System.out.println("邮局将信件发给收信人...");
        //邮局发送信件给收信人
        this.receiver.readMail(message);
    }
}
